﻿
using WQLWebAPI.Domain.Entities;
using WQLWebAPI.Infrastructure.CommonDtos;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using System.Linq;

namespace WQLWebAPI.Domain.Abstract
{
    public interface IBaseRepository<TEntity> where TEntity : Entity
    {
        void Add(TEntity obj);
        Task AddAsync(TEntity obj);
         Task AddRangeAsync(IEnumerable<TEntity> entities);
        TEntity GetById(int id);
        Task<TEntity> GetByIdAsync(int id);
        IQueryable<TEntity> GetAll();
        void Update(TEntity obj);
        void Remove(TEntity entity);
        void RemoveRange(IEnumerable<TEntity> entity);
        int SaveChanges();
        Task<int> SaveChangesAsync();
    }

}
